package com.hzw.net.vm

import android.view.View
import com.hzw.net.page.state.State
import com.hzw.net.page.status.IAbnormalStatus
import com.hzw.net.page.status.ILoadingStatus
import com.hzw.net.vm.event.ICommonEvent
import com.scwang.smart.refresh.layout.api.RefreshLayout

/**
 *
 * @Author:         HuaZhongWei
 * @CreateDate:     2020/4/20 13:19
 *
 * @Description:
 *
 */
interface IView : ICommonEvent {

    fun onRefreshForError(refreshLayout: RefreshLayout) {

    }

    fun onRetryForError() {

    }

    fun onRefreshForEmpty(refreshLayout: RefreshLayout) {

    }

    fun onRetryForEmpty() {

    }

    fun onShowViewForPage(view: View, state: State) {

    }

    fun onHideViewForPage(view: View, state: State) {

    }

    fun onCreateLoading(): ILoadingStatus

    fun onCreateEmpty(): IAbnormalStatus

    fun onCreateError(): IAbnormalStatus
}